import { createRequestTypes } from '@UTILS/reduxHelper'

export const SAVE_CONSULTATION_PARAMS = createRequestTypes('SAVE_CONSULTATION_PARAMS')
export const UPDATE_CONSULTATION_PARAMS = createRequestTypes('UPDATE_CONSULTATION_PARAMS')
export const CLEAR_CONSULTATION_PARAMS = createRequestTypes('CLEAR_CONSULTATION_PARAMS')
export const GET_MY_COUPONS = createRequestTypes('GET_MY_COUPONS')
export const GET_CONSULTATION_AND_RATING = createRequestTypes('GET_CONSULTATION_AND_RATING')

export default {
  dispatchSaveConsultation(payload) {
    return {
      type: SAVE_CONSULTATION_PARAMS.REQUEST,
      payload
    }
  },
  dispatchUpdateConsultation(data) {
    return {
      type: UPDATE_CONSULTATION_PARAMS.REQUEST,
      data
    }
  },
  dispatchClearConsultation() {
    return {
      type: CLEAR_CONSULTATION_PARAMS.REQUEST
    }
  },
  dispatchGetMyCoupons(payload) {
    return {
      type: GET_MY_COUPONS.REQUEST,
      payload
    }
  },
  dispatchGetConsultationAndRating(payload) {
    return {
      type: GET_CONSULTATION_AND_RATING.REQUEST,
      payload
    }
  },
}
